<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Schedule Western</title>

    <!-- Bootstrap core CSS -->
    <link href="<?php echo $this->baseUrl(); ?>/css/bootstrap.css" rel="stylesheet">

    <!-- Add custom CSS here -->
    <link href="<?php echo $this->baseUrl(); ?>/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="<?php echo $this->baseUrl(); ?>/font-awesome/css/font-awesome.min.css">
    <script type="text/javascript" src="<?php echo $this->baseUrl();?>/js/jquery-1.4.3.min.js"></script>
    <!-- Page Specific CSS -->
    <style type="text/css">
		table td,th{ height:50px; text-align: center}
		tr td.tds{
			width: 15%; padding:10px 20px;
		}
		#page-wrapper
		{
			padding: 2px 0px;
			background: #FFF;
			width: 95%;
			margin: 0 auto;
			border-radius: 0px 0px 3px 3px;
			margin-bottom: 5px;
			box-shadow: 0px 0px 13px #8A8A8A;
		}
		.btn img
		{
		margin: 0;
		margin-right: 5px;
		}

		table tr td.time{background: #F5F5F5;}
	</style>
  </head>

  <body>
  <?php 
  $teacher = $this->teacher;
  $subjectmon79 = $this->subjectmon79;
  $subjectmon911 = $this->subjectmon911;
  $subjectmon13 = $this->subjectmon13;
  $subjectmon35 = $this->subjectmon35;
  $subjectmon57 = $this->subjectmon57;
  $subjectmon781 = $this->subjectmon781;
  
  $subjecttur79 = $this->subjecttur79;
  $subjecttur911 = $this->subjecttur911;
  $subjecttur13 = $this->subjecttur13;
  $subjecttur35 = $this->subjecttur35;
  $subjecttur57 = $this->subjecttur57;
  $subjecttur781 = $this->subjecttur781;
  
  $subjectwed79 = $this->subjectwed79;
  $subjectwed911 = $this->subjectwed911;
  $subjectwed13 = $this->subjectwed13;
  $subjectwed35 = $this->subjectwed35;
  $subjectwed57 = $this->subjectwed57;
  $subjectwed781 = $this->subjectwed781;
  
  $subjectthu79 = $this->subjectthu79;
  $subjectthu911 = $this->subjectthu911;
  $subjectthu13 = $this->subjectthu13;
  $subjectthu35 = $this->subjectthu35;
  $subjectthu57 = $this->subjectthu57;
  $subjectthu781 = $this->subjectthu781;
  
  $subjectfri79 = $this->subjectfri79;
  $subjectfri911 = $this->subjectfri911;
  $subjectfri13 = $this->subjectfri13;
  $subjectfri35 = $this->subjectfri35;
  $subjectfri57 = $this->subjectfri57;
  $subjectfri781 = $this->subjectfri781;
  
  $subjectsat810 = $this->subjectsat810;
  $subjectsat1012 = $this->subjectsat1012;
  $subjectsat12 = $this->subjectsat12;
  $subjectsat24 = $this->subjectsat24;
  $subjectsat45 = $this->subjectsat45;
  
  $subjectsun810 = $this->subjectsun810;
  $subjectsun1012 = $this->subjectsun1012;
  $subjectsun12 = $this->subjectsun12;
  $subjectsun24 = $this->subjectsun24;
  $subjectsun45 = $this->subjectsun45;
  
  $roommon79 = $this->roommon79;
  $roommon911 = $this->roommon911;
  $roommon13 = $this->roommon13;
  $roommon35 = $this->roommon35;
  $roommon57 = $this->roommon57;
  $roommon781 = $this->roommon781;
  
  $roomtur79 = $this->roomtur79;
  $roomtur911 = $this->roomtur911;
  $roomtur13 = $this->roomtur13;
  $roomtur35 = $this->roomtur35;
  $roomtur57 = $this->roomtur57;
  $roomtur781 = $this->roomtur781;
  
  $roomwed79 = $this->roomwed79;
  $roomwed911 = $this->roomwed911;
  $roomwed13 = $this->roomwed13;
  $roomwed35 = $this->roomwed35;
  $roomwed57 = $this->roomwed57;
  $roomwed781 = $this->roomwed781;
  
  $roomthu79 = $this->roomthu79;
  $roomthu911 = $this->roomthu911;
  $roomthu13 = $this->roomthu13;
  $roomthu35 = $this->roomthu35;
  $roomthu57 = $this->roomthu57;
  $roomthu781 = $this->roomthu781;
  
  $roomfri79 = $this->roomfri79;
  $roomfri911 = $this->roomfri911;
  $roomfri13 = $this->roomfri13;
  $roomfri35 = $this->roomfri35;
  $roomfri57 = $this->roomfri57;
  $roomfri781 = $this->roomfri781;
  
  $roomsat810 = $this->roomsat810;
  $roomsat1012 = $this->roomsat1012;
  $roomsat12 = $this->roomsat12;
  $roomsat24 = $this->roomsat24;
  $roomsat45 = $this->roomsat45;
  
  $roomsun810 = $this->roomsun810;
  $roomsun1012 = $this->roomsun1012;
  $roomsun12 = $this->roomsun12;
  $roomsun24 = $this->roomsun24;
  $roomsun45 = $this->roomsun45;
  
  if($roommon79 !=""){
		$room79mon = "Room :";
  }else $room79mon = "";
  if($roommon911 !=""){
  	$room911mon = "Room :";
  }else $room911mon = "";
  if($roommon13 !=""){
  	$room13mon = "Room :";
  }else $room13mon = "";
  if($roommon35 !=""){
  	$room35mon = "Room :";
  }else $room35mon = "";
  if($roommon57 !=""){
  	$room57mon = "Room :";
  }else $room57mon = "";
  if($roommon781 !=""){
  	$room781mon = "Room :";
  }else $room781mon = "";
  
  if($roomtur79 !=""){
  	$room79tur = "Room :";
  }else $room79tur = "";
  if($roomtur911 !=""){
  	$room911tur = "Room :";
  }else $room911tur = "";
  if($roomtur13 !=""){
  	$room13tur = "Room :";
  }else $room13tur = "";
  if($roomtur35 !=""){
  	$room35tur = "Room :";
  }else $room35tur = "";
  if($roomtur57 !=""){
  	$room57tur = "Room :";
  }else $room57tur = "";
  if($roomtur781 !=""){
  	$room781tur = "Room :";
  }else $room781tur = "";
  if($roomwed79 !=""){
  	$room79wed = "Room :";
  }else $room79wed = "";
  if($roomwed911 !=""){
  	$room911wed = "Room :";
  }else $room911wed = "";
  if($roomwed13 !=""){
  	$room13wed = "Room :";
  }else $room13wed = "";
  if($roomwed35 !=""){
  	$room35wed = "Room :";
  }else $room35wed = "";
  if($roomwed57 !=""){
  	$room57wed = "Room :";
  }else $room57wed = "";
  if($roomwed781 !=""){
  	$room781wed = "Room :";
  }else $room781wed = "";
  
  if($roomthu79 !=""){
  	$room79thu = "Room :";
  }else $room79thu = "";
  if($roomthu911 !=""){
  	$room911thu = "Room :";
  }else $room911thu = "";
  if($roomthu13 !=""){
  	$room13thu = "Room :";
  }else $room13thu = "";
  if($roomthu35 !=""){
  	$room35thu = "Room :";
  }else $room35thu = "";
  if($roomthu57 !=""){
  	$room57thu = "Room :";
  }else $room57thu = "";
  if($roomthu781 !=""){
  	$room781thu = "Room :";
  }else $room781thu = "";
  
  if($roomfri79 !=""){
  	$room79fri = "Room :";
  }else $room79fri = "";
  if($roomfri911 !=""){
  	$room911fri = "Room :";
  }else $room911fri = "";
  if($roomfri13 !=""){
  	$room13fri = "Room :";
  }else $room13fri = "";
  if($roomfri35 !=""){
  	$room35fri = "Room :";
  }else $room35fri = "";
  if($roomfri57 !=""){
  	$room57fri = "Room :";
  }else $room57fri = "";
  if($roomfri781 !=""){
  	$room781fri = "Room :";
  }else $room781fri = "";
  
  if($roomsat810 !=""){
  	$room810sat = "Room :";
  }else $room810sat = "";
  if($roomsat1012 !=""){
  	$room1012sat = "Room :";
  }else $room1012sat = "";
  if($roomsat12 !=""){
  	$room12sat = "Room :";
  }else $room12sat = "";
  if($roomsat24 !=""){
  	$room24sat = "Room :";
  }else $room24sat = "";
  if($roomsat45 !=""){
  	$room45sat = "Room :";
  }else $room45sat = "";
  
  if($roomsun810 !=""){
  	$room810sun = "Room :";
  }else $room810sun = "";
  if($roomsun1012 !=""){
  	$room1012sun = "Room :";
  }else $room1012sun = "";
  if($roomsun12 !=""){
  	$room12sun = "Room :";
  }else $room12sun = "";
  if($roomsun24 !=""){
  	$room24sun = "Room :";
  }else $room24sun = "";
  if($roomsun45 !=""){
  	$room45sun = "Room :";
  }else $room45sun = "";
?>
<div id="page-wrapper">

        <div class="row"  style=" width:100%; margin:0 auto" >
          <div class="col-lg-13">
            <div class="panel-heading" style=" width: 95%; margin:0 auto;">    	  
        	  <h2 style=" color: #38A3D6; border-bottom: 5px solid #38A3D6; padding: 13px 0px; margin: -10px 0px 15px 0px;"> Lecturer Schedule 
          <button type="button" onClick="DeleteTmpTeacher();Clickheretoprint();" class="btn btn-small btn-primary" style="float: right">
			<b><i class="glyphicon glyphicon-print"></i></b> &nbsp;Print 
		  </button>
        </div>   
        </div>
        </div><!-- /.row -->
  <div id="print_content">
  <style type="text/css">
		table td,th{ height:35px; text-align: center; font-family:sans-serif,cursive; font-size:13px; color:#333}
		.table-bordered {
		border: 1px solid #dddddd;
		}
		.table {
		 width: 100%; 
		 margin-bottom: 20px; 
		}
		.table {
		position: relative;
		}
		table {
		 max-width: 100%; 
		 background-color: transparent; 
		}
		table {
		 border-collapse: collapse;
		border-spacing: 0;
		}
		table th{
		background:#EEE;
		}
				tbody {
		display: table-row-group;
		vertical-align: middle;
		border-color: inherit;
		}

		table tr td.time{background: #F5F5F5; width:7% !important}
		table td{width:10%;height:50px;}
	</style>
        <div class="col-lg-13 container">
        <div style="border-bottom:2px solid #000">
		<table style="width:100%; padding:0 5px 0px 5px">
		  <tr>
		    <td style="height:10px;text-align:left; border:0;font-family:'Khmer OS Muol', 'Khmer OS Muol Light', 'Khmer OS Muol Pali'"><b>សាកលវិទ្យាល័យ វេស្ទើន</b></td>
		    <td style="height:10px;text-align:center; border:0;font-weight:bold;"><b>ACADEMIC YEAR <?php echo $this->acadamic; ?></b></td>
		    <input type="text" id="semesters" name="semesters" value="<?php echo $this->semester;?>" >
		    <input type="text" id="academics" name="academics" value="<?php echo $this->acadamic;?>" >
		    <td style="height:10px;text-align:right; border:0;font-weight:bold;"><b>WESTERN UNIVERSITY</b></td>
		  </tr>
		</table>
	</div>
<div style="text-align:center; font-size:15px; font-weight:bold;">
 	<h4>Schedule of Lecturer</h4>
		<!--  <div class="col-lg-13 container">-->
		<table style="width:100%;" >
			<tr>
			    <td style="height:20px;width:50%; float:left; text-align: left;">
			    <b style="font-size:15px;">Year I, Semester 
			    	<?php if($this->semester ==1)
			    			{ echo " I ";} 
			    			else {echo " II ";} 
			    	?>
			    	</b>
			    </td>	    
			    <td style="height:26px; width:50%;float: right; font-size:15px; text-align: right;">Teacher Name: <b> <?php echo $teacher["teacher_name"];?></b></td>	    
		    </tr>
		</table>
            <div class="table-responsive" id="section_mornning">
              <table class="table table-bordered" border="1">
                <thead class="breadcrumb">
                  <tr>
                    <th width="5%">Time </th>
                    <th>Monday </th>
                    <th>Tuesday </th>
                    <th>Wenesday</th>
                    <th>Thursday </th>
                    <th>Friday </th>
                  </tr>
                </thead>
                 <tbody>
                  <tr>
                    <td class="time">07:30-09:00</td> 
                    <td>
                    	<?php echo $subjectmon79["subject_name"]."<br />".$room79mon.$roommon79["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjecttur79["subject_name"]."<br />".$room79tur.$roomtur79["room_name"]; ?>
                    </td>
                    <td>
                    	<?php echo $subjectwed79["subject_name"]."<br />".$room79wed.$roomwed79["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectthu79["subject_name"]."<br />".$room79thu.$roomthu79["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectfri79["subject_name"]."<br />".$room79fri.$roomfri79["room_name"];?>
                    </td>
                  </tr>
                  <tr>
                    <td class="time">09:30-11:00</td>
                    <td>
                    	<?php echo $subjectmon911["subject_name"]."<br />".$room911mon.$roommon911["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjecttur911["subject_name"]."<br />".$room911tur.$roomtur911["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectwed911["subject_name"]."<br />".$room911wed.$roomwed911["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectthu911["subject_name"]."<br />".$room911thu.$roomthu911["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectfri911["subject_name"]."<br />".$room911fri.$roomfri911["room_name"];?>
                    </td>
                  </tr>
                  <tr>
                    <td class="time">01:30-03:00</td>
                    <td>
                    	<?php echo $subjectmon13["subject_name"]."<br />".$room13mon.$room13mon.$roommon13["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjecttur13["subject_name"]."<br />".$room13tur.$roomtur13["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectwed13["subject_name"]."<br />".$room13wed.$roomwed13["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectthu13["subject_name"]."<br />".$room13thu.$roomthu13["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectfri13["subject_name"]."<br />".$room13fri.$roomfri13["room_name"];?>
                    </td>
                  </tr>
                  
                  <tr>
                    <td class="time">03:30 - 05:00</td>
                    <td>
                    	<?php echo $subjectmon35["subject_name"]."<br />".$room35mon.$roommon35["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjecttur35["subject_name"]."<br />".$room35tur.$roomtur35["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectwed35["subject_name"]."<br />".$room35wed.$roomwed35["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectthu35["subject_name"]."<br />".$room35thu.$roomthu35["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectfri35["subject_name"]."<br />".$room35fri.$roomfri35["room_name"];?>
                    </td>
                  </tr>
                  
                  <tr>
                    <td class="time">05:30 - 06:55</td> 
                    <td>
                    	<?php echo $subjectmon57["subject_name"]."<br />".$room57mon.$roommon57["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjecttur57["subject_name"]."<br />".$room57tur.$roomtur57["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectwed57["subject_name"]."<br />".$room57wed.$roomwed57["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectthu57["subject_name"]."<br />".$room57thu.$roomthu57["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectfri57["subject_name"]."<br />".$room57fri.$roomfri57["room_name"];?>
                    </td>
                  </tr>
                  <tr>
                    <td class="time">07:05 - 08:30</td>
                    <td>
                    	<?php echo $subjectmon781["subject_name"]."<br />".$room781mon.$roommon781["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjecttur781["subject_name"]."<br />".$room781tur.$roomtur781["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectwed781["subject_name"]."<br />".$room781wed.$roomwed781["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectthu781["subject_name"]."<br />".$room781thu.$roomthu781["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectfri781["subject_name"]."<br />".$room781fri.$roomfri781["room_name"];?>
                    </td>
                  </tr>
                </tbody>
              </table> 
              
              <table class="table table-bordered" border="1">
                <thead class="breadcrumb">
                  <tr>
                    <th width="5%">Time </th>
                    <th>07:30-09:00 </th>
                    <th>09:30-11:00 </th>
                    <th>01:00-02:25</th>
                    <th>02:30-03:55 </th>
                    <th>04:00-05:25 </th>
                  </tr>
                </thead>
                 <tbody>
                  <tr>
                    <td class="time">Saturday</td> 
                    <td>
                    	<?php echo $subjectsat810["subject_name"]."<br />".$room810sat.$roomsat810["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectsat1012["subject_name"]."<br />".$room1012sat.$roomsat1012["room_name"]; ?>
                    </td>
                    <td>
                    	<?php echo $subjectsat12["subject_name"]."<br />".$room12sat.$roomsat12["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectsat24["subject_name"]."<br />".$room24sat.$roomsat24["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectsat45["subject_name"]."<br />".$room45sat.$roomsat45["room_name"];?>
                    </td>
                  </tr>
                  <tr>
                    <td class="time">Sunday</td>
                    <td>
                    	<?php echo $subjectsun810["subject_name"]."<br />".$room810sun.$roomsun810["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectsun1012["subject_name"]."<br />".$room1012sun.$roomsun1012["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectsun12["subject_name"]."<br />".$room12sun.$roomsun12["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectsun24["subject_name"]."<br />".$room24sun.$roomsun24["room_name"];?>
                    </td>
                    <td>
                    	<?php echo $subjectsun45["subject_name"]."<br />".$room45sun.$roomsun45["room_name"];?>
                    </td>
                  </tr>
                  
                </tbody>
              </table>     
	</div>
	<div class="" style="text-align:center; margin-top: 20px; font-size: 13px !important;">
		<hr />
		#15, Street 528, Sangkat Boeungkok I, Khan Toul Kork, Phom Penh, CAMBODIA.<br />
		Tel: 023 99 82 33, Email: <u>info_wu@western.edu.kh</u>, <u>Website: www.western.edu.kh</u>
	</div>      
</div><!-- /#page-wrapper -->
</div>
</div>
</div>

	<script type="text/javascript">
	function Clickheretoprint()
	{ 
	  var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
	      disp_setting+="scrollbars=yes,width=600, height=300, left=100, top=25"; 
	  var content_vlue = document.getElementById("print_content").innerHTML; 	  
	  var docprint=window.open("","",disp_setting); 
	   docprint.document.open(); 
	   docprint.document.write('<html><head><title>Schedule Management System</title>'); 
	   docprint.document.write('</head><body onLoad="self.print()" style=" margin:0px; font-family:Verdana; font-size:8px;"><center>');          
	   docprint.document.write(content_vlue);          
	   docprint.document.write('</center></body></html>'); 
	   docprint.document.close(); 
	   docprint.focus();
	}
	<?php $url_delete =  $this->url(array('module'=>'','controller'=>'index','action'=>'delete-tmp-teacher')); ?>
	function DeleteTmpTeacher(){
		var semesters = $("#semesters").val();
		var academics = $("#academics").val();
		$.ajax({
		    url: "<?php echo $url_delete;?>",
		    type: 'post',
		    data: {'semesters':semesters,'academics':academics},
		    success: function (data) {
		    }, error: function() {
		    	alert(error);
		    }
		});
	}
	</script>
    <!-- Bootstrap core JavaScript -->
    <script src="<?php $this->baseUrl()?>/js/jquery-1.4.3.min.js"></script>
    <script src="<?php $this->baseUrl()?>/js/jquery.min.js"></script>
    <script src="<?php $this->baseUrl()?>/js/bootstrap.js"></script>
    <!-- Page Specific Plugins -->
    <script src="<?php $this->baseUrl()?>/js/raphael-min.js"></script>
    <script src="<?php $this->baseUrl()?>/js/morris-0.4.3.min.js"></script>
    <script src="<?php $this->baseUrl()?>/js/morris/chart-data-morris.js"></script>
    <script src="<?php $this->baseUrl()?>/js/tablesorter/jquery.tablesorter.js"></script>
    <script src="<?php $this->baseUrl()?>/js/tablesorter/tables.js"></script>
  </body>
</html>